import request from '../utils/request';

export function linkList(params) {
  return request(`api/portal/v1.0/outside_link/list?page=${params.page}&per_page=${params.results}`);
}

export async function deleteLink(params) {
  return request(`api/portal/v1.0/outside_link?id=${params}`, {
    method: "delete",
  });
}

export async function addOrganization(params,flag) {
  const method = flag ==='update'?'PUT':'POST';
  return request(`api/auth/v1.0/org?id=${params.id}`, {
    method: method,
    body: {
      ...params,
      method: method,
    },
  });
}
